<?php                          
use_javascript('wemTabs.js','last');
use_stylesheet('list.css');
use_helper('toolsbar');
slot('PageTitle',"New Power Device");
slot('Title',"New Power Device");
?>

<div id="tabs">
    
    <ul>
    <?php if (isset($form)){ ?> 
        <li><a href='#tab-one'><span>Create One</span></a></li>
    <?php }?>
    <?php if (isset($formMany)){ ?>    
            <li><a href='#tab-many'><span>Create Many</span></a></li>
    <?php }?>
    </ul>
    
    <?php if (isset($form)){ ?> 
        <div id="tab-one">
            <?php include_partial('form', array('form' => $form)) ?>
        </div>
    <?php }?>
    
    <?php if (isset($formMany)){ ?>
        <div id="tab-many">
            Insert many Power Dev in few clicks!
            <div>
                <form action="<?php echo url_for('powerdev_getFixtures')?>" method="POST" enctype="multipart/form-data">
                    <?php echo $formMany ?>
                    <div> <input type="submit" value="Get File" /></div>    
                </form>
            </div>
            
        <?php if (isset($errors)){ ?>
            <div class="redlight">
                <?php foreach ($errors as $errRow=>$errMsg){ ?>
                <div><?php echo "Error inserting excel row ".$errRow.": ".$errMsg?></div>
           <?php } ?>
            </div>
        <?php }?>
        </div>
    <?php }?>
    

    
</div>

